package cn.aylog.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TargetController {
    @RequestMapping("/target-p")
    public String toTarget() {
        int i = 1 / 0;
        return "target";
    }

    @ExceptionHandler({IndexOutOfBoundsException.class})
    public String e(Exception e) {
        System.out.println(e.getMessage());
        return "error";
    }
}
